<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>fluidCCk</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="fluidCCi.html" title="fluidCCi" />
    <link rel="next" href="fluidControl.html" title="fluidControl" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">fluidCCk</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="fluidCCi.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="fluidControl.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="fluidCCk"></a>
      <div class="titlepage"></div>
      <a id="IndexFluidCCk" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">fluidCCk</span>
        </h2>
        <p>fluidCCk — 
      Sends a MIDI controller data message to fluid.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp108541472"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>fluidCCk</strong></span> iEngineNumber, iChannelNumber, iControllerNumber, kValue</pre>
      </div>
      <div class="refsect1">
        <a id="idp108603392"></a>
        <h2>Description</h2>
        <p>Sends a MIDI controller data (MIDI controller number and value to use)
    message to a fluid engine by number on the user specified MIDI channel number.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp108604720"></a>
        <h2>Initialization</h2>
        <p><span class="emphasis"><em>iEngineNumber </em></span> -- engine number assigned from
    fluidEngine</p>
        <p><span class="emphasis"><em>iChannelNumber </em></span> -- MIDI channel number to which the
    Fluidsynth program is assigned: from 0 to 255. MIDI channels numbered 16 or
    higher are virtual channels.</p>
        <p><span class="emphasis"><em>iControllerNumber </em></span> -- MIDI controller number to use
    for this message</p>
      </div>
      <div class="refsect1">
        <a id="idp108607760"></a>
        <h2>Performance</h2>
        <p><span class="emphasis"><em>kValue </em></span> -- value to set for controller (usually
  0-127)</p>
      </div>
      <div class="refsect1">
        <a id="idp108609296"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the fluidCCk opcodes. It uses the file <a class="ulink" href="examples/fluidCCk.csd" target="_top"><em class="citetitle">fluidCCk.csd</em></a>.
    </p>
        <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac      <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">;-o fluidCCk.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span> <span class="op">=</span> 1

giengine <span class="opc">fluidEngine</span>
<span class="comment">; soundfont path to manual/examples</span>
isfnum	 <span class="opc">fluidLoad</span> "22Bassoon.sf2", giengine, 1
	 <span class="opc">fluidProgramSelect</span> giengine, 1, isfnum, 0, 70

<span class="oblock">instr</span> 1

	<span class="opc">mididefault</span>   60, p3
	<span class="opc">midinoteonkey</span> p4, p5
ikey	<span class="opc">init</span> p4
ivel	<span class="opc">init</span> p5
kpan	<span class="opc">line</span> 0, p3, 127 <span class="comment">;panning from left to right</span>
	<span class="opc">fluidCCk</span> giengine, 1, 10, kpan <span class="comment">;CC 10 = pan</span>
	<span class="opc">fluidNote</span> giengine, 1, ikey, ivel

<span class="oblock">endin</span>

<span class="oblock">instr</span> 99

imvol  <span class="opc">init</span> 7
asigl, asigr <span class="opc">fluidOut</span> giengine
       <span class="opc">outs</span> asigl<span class="op">*</span>imvol, asigr<span class="op">*</span>imvol

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span> 1 0 4 48 100
<span class="stamnt">i</span> 1 4 2 50 120
<span class="stamnt">i</span> 1 6 1 53 80
<span class="stamnt">i</span> 1 7 1 45 70
<span class="stamnt">i</span> 1 8 1.5 48 80

<span class="stamnt">i</span> 99 0 10      <span class="comment">;keep instr 99 active</span>
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
      </div>
      <div class="refsect1">
        <a id="idp108612256"></a>
        <h2>See Also</h2>
        <p><a class="link" href="fluidEngine.html" title="fluidEngine"><em class="citetitle">fluidEngine</em></a>, <a class="link" href="fluidNote.html" title="fluidNote"><em class="citetitle">fluidNote</em></a>, <a class="link" href="fluidLoad.html" title="fluidLoad"><em class="citetitle">fluidLoad</em></a>, <a class="link" href="fluidCCi.html" title="fluidCCi"><em class="citetitle">fluidCCi</em></a></p>
        <p> More information on soundfonts in the Floss Manuals: <a class="ulink" href="http://en.flossmanuals.net/csound/ch048_d-reading-midi-files" target="_top"><em class="citetitle">http://en.flossmanuals.net/csound/ch048_d-reading-midi-files</em></a></p>
        <p> Other information on soundfonts on Wikipedia: <a class="ulink" href="http://en.wikipedia.org/wiki/Soundfont" target="_top"><em class="citetitle">http://en.wikipedia.org/wiki/Soundfont</em></a></p>
      </div>
      <div class="refsect1">
        <a id="idp108619280"></a>
        <h2>Credits</h2>
        <p>Michael Gogins (gogins at pipeline dot com), Steven Yi. 
    Thanks to Peter Hanappe for Fluidsynth.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="fluidCCi.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="fluidControl.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">fluidCCi </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> fluidControl</td>
        </tr>
      </table>
    </div>
  </body>
</html>
